//导入 
import {configureStore} from '@reduxjs/toolkit'
import countReducer from './slices/countSlice';
// 创建 store 对象
let store = configureStore({
  reducer: {
    count: countReducer
  }
});

//暴露
export default store;

// 定义一个类型  保存状态值的类型
export type RootState = ReturnType<typeof store.getState>; // {count: xx, todo: xx}
//dispatch 函数的类型
export type AppDispatch = typeof store.dispatch